<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/itheima.js"></script>
</head>
<body>
<div id="div1">11111111111</div>
<div id="div2">22222222222</div>

<script>
    /*//根据id获取元素对象
    var elementById = document.getElementById("div1");
    var elementById2 = document.getElementById("div2");*/
    var elementById = $("div1");
    var elementById2 = $("div2");

    //获取元素内容
    alert(elementById.innerHTML);
    alert(elementById2.innerHTML);



</script>
</body>
</html>